package com.taptech.doufu.util;

import android.content.Context;

import com.taptech.doufu.ui.activity.weex.SimpleWeexActivity;
import com.taptech.doufu.services.personalcenter.AccountService;

/**
 * author zhangyongcun
 * 16/11/1
 */

public class DoufuUtils {
    /**
     * 网络错误提示
     * @param mContext
     */
    public static void netWorkErrorToast(Context mContext) {
        UIUtil.toastMessage(mContext, "网络异常，请检查网络后再试");
    }

    /**
     * 跳转的 VIP 页面
     * @param mContext
     */
    public static void startVipActivity(Context mContext) {
        TMAnalysis.event(mContext, "3_7_PersonalCenter_mymember");
        SimpleWeexActivity.startActivity(mContext,"vue/personalcenter/TFBuyMember.js");


    }

    /**
     *检查是否登录如果未跳转自动跳转
     */
    public static boolean checkLoginJump() {
        if (!AccountService.getInstance().isLogin()) {
            AccountService.getInstance().jumpToLogin();
            return false;
        }else {
            return true;
        }
    }
}
